package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.YxDeviceNoticeMessageVo;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.YxDeviceNoticeMessageMapper;
import com.ruoyi.system.domain.YxDeviceNoticeMessage;
import com.ruoyi.system.service.IYxDeviceNoticeMessageService;

/**
 * 设备通知消息Service业务层处理
 * 
 * @author lingyu
 * @date 2024-03-14
 */
@Service
public class YxDeviceNoticeMessageServiceImpl implements IYxDeviceNoticeMessageService 
{
    @Autowired
    private YxDeviceNoticeMessageMapper yxDeviceNoticeMessageMapper;

    /**
     * 查询设备通知消息
     * 
     * @param id 设备通知消息主键
     * @return 设备通知消息
     */
    @Override
    public YxDeviceNoticeMessage selectYxDeviceNoticeMessageById(Long id)
    {
        return yxDeviceNoticeMessageMapper.selectYxDeviceNoticeMessageById(id);
    }

    /**
     * 查询设备通知消息列表
     * 
     * @param yxDeviceNoticeMessage 设备通知消息
     * @return 设备通知消息
     */
    @Override
    public List<YxDeviceNoticeMessage> selectYxDeviceNoticeMessageList(YxDeviceNoticeMessage yxDeviceNoticeMessage)
    {
        return yxDeviceNoticeMessageMapper.selectYxDeviceNoticeMessageList(yxDeviceNoticeMessage);
    }

    /**
     * 查询设备通知消息列表
     *
     * @param yxDeviceNoticeMessage 设备通知消息
     * @return 设备通知消息集合
     */
    public List<YxDeviceNoticeMessageVo> selectYxDeviceNoticeMessageVoList(YxDeviceNoticeMessage yxDeviceNoticeMessage){
        return yxDeviceNoticeMessageMapper.selectYxDeviceNoticeMessageVoList(yxDeviceNoticeMessage);
    }

    /**
     * 新增设备通知消息
     * 
     * @param yxDeviceNoticeMessage 设备通知消息
     * @return 结果
     */
    @Override
    public int insertYxDeviceNoticeMessage(YxDeviceNoticeMessage yxDeviceNoticeMessage)
    {
        yxDeviceNoticeMessage.setCreateTime(DateUtils.getNowDate());
        return yxDeviceNoticeMessageMapper.insertYxDeviceNoticeMessage(yxDeviceNoticeMessage);
    }

    /**
     * 修改设备通知消息
     * 
     * @param yxDeviceNoticeMessage 设备通知消息
     * @return 结果
     */
    @Override
    public int updateYxDeviceNoticeMessage(YxDeviceNoticeMessage yxDeviceNoticeMessage)
    {
        return yxDeviceNoticeMessageMapper.updateYxDeviceNoticeMessage(yxDeviceNoticeMessage);
    }

    /**
     * 批量删除设备通知消息
     * 
     * @param ids 需要删除的设备通知消息主键
     * @return 结果
     */
    @Override
    public int deleteYxDeviceNoticeMessageByIds(Long[] ids)
    {
        return yxDeviceNoticeMessageMapper.deleteYxDeviceNoticeMessageByIds(ids);
    }

    /**
     * 删除设备通知消息信息
     * 
     * @param id 设备通知消息主键
     * @return 结果
     */
    @Override
    public int deleteYxDeviceNoticeMessageById(Long id)
    {
        return yxDeviceNoticeMessageMapper.deleteYxDeviceNoticeMessageById(id);
    }
}
